package com.luo.partner.dao.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class TabRedExample implements Serializable {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private static final long serialVersionUID = 1L;

    public TabRedExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria implements Serializable {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRedIdIsNull() {
            addCriterion("red_id is null");
            return (Criteria) this;
        }

        public Criteria andRedIdIsNotNull() {
            addCriterion("red_id is not null");
            return (Criteria) this;
        }

        public Criteria andRedIdEqualTo(Integer value) {
            addCriterion("red_id =", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdNotEqualTo(Integer value) {
            addCriterion("red_id <>", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdGreaterThan(Integer value) {
            addCriterion("red_id >", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("red_id >=", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdLessThan(Integer value) {
            addCriterion("red_id <", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdLessThanOrEqualTo(Integer value) {
            addCriterion("red_id <=", value, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdIn(List<Integer> values) {
            addCriterion("red_id in", values, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdNotIn(List<Integer> values) {
            addCriterion("red_id not in", values, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdBetween(Integer value1, Integer value2) {
            addCriterion("red_id between", value1, value2, "redId");
            return (Criteria) this;
        }

        public Criteria andRedIdNotBetween(Integer value1, Integer value2) {
            addCriterion("red_id not between", value1, value2, "redId");
            return (Criteria) this;
        }

        public Criteria andRedNameIsNull() {
            addCriterion("red_name is null");
            return (Criteria) this;
        }

        public Criteria andRedNameIsNotNull() {
            addCriterion("red_name is not null");
            return (Criteria) this;
        }

        public Criteria andRedNameEqualTo(String value) {
            addCriterion("red_name =", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameNotEqualTo(String value) {
            addCriterion("red_name <>", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameGreaterThan(String value) {
            addCriterion("red_name >", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameGreaterThanOrEqualTo(String value) {
            addCriterion("red_name >=", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameLessThan(String value) {
            addCriterion("red_name <", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameLessThanOrEqualTo(String value) {
            addCriterion("red_name <=", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameLike(String value) {
            addCriterion("red_name like", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameNotLike(String value) {
            addCriterion("red_name not like", value, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameIn(List<String> values) {
            addCriterion("red_name in", values, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameNotIn(List<String> values) {
            addCriterion("red_name not in", values, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameBetween(String value1, String value2) {
            addCriterion("red_name between", value1, value2, "redName");
            return (Criteria) this;
        }

        public Criteria andRedNameNotBetween(String value1, String value2) {
            addCriterion("red_name not between", value1, value2, "redName");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNull() {
            addCriterion("description is null");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNotNull() {
            addCriterion("description is not null");
            return (Criteria) this;
        }

        public Criteria andDescriptionEqualTo(String value) {
            addCriterion("description =", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotEqualTo(String value) {
            addCriterion("description <>", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThan(String value) {
            addCriterion("description >", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion("description >=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThan(String value) {
            addCriterion("description <", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThanOrEqualTo(String value) {
            addCriterion("description <=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLike(String value) {
            addCriterion("description like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotLike(String value) {
            addCriterion("description not like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionIn(List<String> values) {
            addCriterion("description in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotIn(List<String> values) {
            addCriterion("description not in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionBetween(String value1, String value2) {
            addCriterion("description between", value1, value2, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotBetween(String value1, String value2) {
            addCriterion("description not between", value1, value2, "description");
            return (Criteria) this;
        }

        public Criteria andLowerLimitIsNull() {
            addCriterion("lower_limit is null");
            return (Criteria) this;
        }

        public Criteria andLowerLimitIsNotNull() {
            addCriterion("lower_limit is not null");
            return (Criteria) this;
        }

        public Criteria andLowerLimitEqualTo(BigDecimal value) {
            addCriterion("lower_limit =", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitNotEqualTo(BigDecimal value) {
            addCriterion("lower_limit <>", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitGreaterThan(BigDecimal value) {
            addCriterion("lower_limit >", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("lower_limit >=", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitLessThan(BigDecimal value) {
            addCriterion("lower_limit <", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitLessThanOrEqualTo(BigDecimal value) {
            addCriterion("lower_limit <=", value, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitIn(List<BigDecimal> values) {
            addCriterion("lower_limit in", values, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitNotIn(List<BigDecimal> values) {
            addCriterion("lower_limit not in", values, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("lower_limit between", value1, value2, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andLowerLimitNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("lower_limit not between", value1, value2, "lowerLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitIsNull() {
            addCriterion("up_limit is null");
            return (Criteria) this;
        }

        public Criteria andUpLimitIsNotNull() {
            addCriterion("up_limit is not null");
            return (Criteria) this;
        }

        public Criteria andUpLimitEqualTo(BigDecimal value) {
            addCriterion("up_limit =", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitNotEqualTo(BigDecimal value) {
            addCriterion("up_limit <>", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitGreaterThan(BigDecimal value) {
            addCriterion("up_limit >", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("up_limit >=", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitLessThan(BigDecimal value) {
            addCriterion("up_limit <", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitLessThanOrEqualTo(BigDecimal value) {
            addCriterion("up_limit <=", value, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitIn(List<BigDecimal> values) {
            addCriterion("up_limit in", values, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitNotIn(List<BigDecimal> values) {
            addCriterion("up_limit not in", values, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("up_limit between", value1, value2, "upLimit");
            return (Criteria) this;
        }

        public Criteria andUpLimitNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("up_limit not between", value1, value2, "upLimit");
            return (Criteria) this;
        }

        public Criteria andStateIsNull() {
            addCriterion("state is null");
            return (Criteria) this;
        }

        public Criteria andStateIsNotNull() {
            addCriterion("state is not null");
            return (Criteria) this;
        }

        public Criteria andStateEqualTo(Integer value) {
            addCriterion("state =", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotEqualTo(Integer value) {
            addCriterion("state <>", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThan(Integer value) {
            addCriterion("state >", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("state >=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThan(Integer value) {
            addCriterion("state <", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThanOrEqualTo(Integer value) {
            addCriterion("state <=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateIn(List<Integer> values) {
            addCriterion("state in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotIn(List<Integer> values) {
            addCriterion("state not in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateBetween(Integer value1, Integer value2) {
            addCriterion("state between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotBetween(Integer value1, Integer value2) {
            addCriterion("state not between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Long value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Long value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Long value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Long value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Long value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Long> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Long> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Long value1, Long value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Long value1, Long value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andSetTypeIsNull() {
            addCriterion("set_type is null");
            return (Criteria) this;
        }

        public Criteria andSetTypeIsNotNull() {
            addCriterion("set_type is not null");
            return (Criteria) this;
        }

        public Criteria andSetTypeEqualTo(Integer value) {
            addCriterion("set_type =", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeNotEqualTo(Integer value) {
            addCriterion("set_type <>", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeGreaterThan(Integer value) {
            addCriterion("set_type >", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("set_type >=", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeLessThan(Integer value) {
            addCriterion("set_type <", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeLessThanOrEqualTo(Integer value) {
            addCriterion("set_type <=", value, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeIn(List<Integer> values) {
            addCriterion("set_type in", values, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeNotIn(List<Integer> values) {
            addCriterion("set_type not in", values, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeBetween(Integer value1, Integer value2) {
            addCriterion("set_type between", value1, value2, "setType");
            return (Criteria) this;
        }

        public Criteria andSetTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("set_type not between", value1, value2, "setType");
            return (Criteria) this;
        }

        public Criteria andRateIsNull() {
            addCriterion("rate is null");
            return (Criteria) this;
        }

        public Criteria andRateIsNotNull() {
            addCriterion("rate is not null");
            return (Criteria) this;
        }

        public Criteria andRateEqualTo(BigDecimal value) {
            addCriterion("rate =", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateNotEqualTo(BigDecimal value) {
            addCriterion("rate <>", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateGreaterThan(BigDecimal value) {
            addCriterion("rate >", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("rate >=", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateLessThan(BigDecimal value) {
            addCriterion("rate <", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateLessThanOrEqualTo(BigDecimal value) {
            addCriterion("rate <=", value, "rate");
            return (Criteria) this;
        }

        public Criteria andRateIn(List<BigDecimal> values) {
            addCriterion("rate in", values, "rate");
            return (Criteria) this;
        }

        public Criteria andRateNotIn(List<BigDecimal> values) {
            addCriterion("rate not in", values, "rate");
            return (Criteria) this;
        }

        public Criteria andRateBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("rate between", value1, value2, "rate");
            return (Criteria) this;
        }

        public Criteria andRateNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("rate not between", value1, value2, "rate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria implements Serializable {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion implements Serializable {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}